package de.keychain

import grails.converters.JSON

class LoginController {

	def doLogin() {

		session.user = request.JSON

		def result = [isLoggedIn:true]

		render result as JSON
		
		log.debug(session.user)
	}
	
	
	def doLogout(){
		session.user = null
		
		redirect(uri:"/")
	}
}
